home *** CD-ROM | disk | FTP | other *** search
- * Program CSEGSESS - Generates SESSFILE file of people's Session Assignments
- Store d+':SESSFILE' to M1FILE
- ACCEPT 'Do you need to have a new SESSFILE created? ' to xx
- If !(xx)='Y'
- Erase
- @ 2,10 say 'Sessions file generation process'
- ? 'This program prints out data errors when found, so ready the printer.'
- @ 5,0 say 'Now scanning the EDIRFILE for Session codes and names.'
- Select secondary
- Store 'SESS=' to spac
- Find &SPAC
- If # = 0
- Accept 'No Sessions found in EDIRFILE. Press <retn> to terminate.' to XX
- else
- Store chr(31) to chr31
- Store '=' to actlist
- ? ' Event Sessions are: '
- Do while spact='SESS=' .and. .not. EOF
- ? $(spact,6,55)
- Store actlist+$(spact,6,5)+'=' to actlist
- SKIP
- enddo
- ?
- ? 'Now copying MEMBERS that have Sessions to file SESSFILE.'
- Select primary
- Use &MFILE
- Set talk on
- COPY to &M1FILE for sessions <> ' '
- Set talk off
- USE &M1FILE
- GOTO BOTTOM
- Store #+1 to lastrec
- GOTO top
- Store 1 to reccount
- ? 'Now expanding SESSFILE file for multi-sessions people.'
- ? 'Ready the printer for printing Session code errors.'
- Set format to print
- @ 1,20 say 'Sessions code errors in MEMBERSE file - '+curdate
- Store 3 to curline
- Store 0 to recnumB
- Store 0 to recc
- Do while # < lastrec
- Store SESSIONS to sess
- Store # to currec
- Store 1 to fieldcnt
- Do while fieldcnt < 49
- Store $(sess,fieldcnt,5)+'=' to spactiv
- If spactiv=' ='
- Store 49 to fieldcnt
- else
- If @(spactiv,actlist)=0
- Store $(sess,fieldcnt,49-fieldcnt) to badspact
- If fieldcnt=1
- Delete
- endif
- Store 50 to fieldcnt
- else
- STORE $(SESS,FIELDCNT,5)+'.' TO SPACTIV
- IF $(SESS,FIELDCNT+5,1)='"'
- STORE $(SPActiv,1,5)+chr31 TO SPACTIV
- ENDIF
- If fieldcnt>1
- Store last:name to xlast
- Store first:name to xfirst
- Store membstatus to xmemb
- Store home:phone to xhph
- Store address to xaddr
- Store city:state to xcityst
- Store zip to xzip
- Store birthdate to xbirth
- Store ss:sc:memb to xsssc
- Store room to xroom
- Store transpor to xtrans
- Store dates to xdates
- Append blank
- Replace last:name with xlast
- Replace first:name with xfirst
- Replace membstatus with xmemb
- Replace home:phone with xhph
- Replace address with xaddr
- Replace city:state with xcityst
- Replace zip with xzip
- Replace birthdate with xbirth
- Replace ss:sc:memb with xsssc
- Replace room with xroom
- Replace transpor with xtrans
- Replace sessions with spactiv
- Replace dates with xdates
- GOTO currec
- ELSE
- REPLACE SESSIONS WITH SPACTIV
- endif
- Store fieldcnt+6 to fieldcnt
- endif
- endif
- enddo
- If fieldcnt = 50
- @ curline,1 say $(badspact,1,6)+' '+last:name+$(first:name,1,20)+home:phone+;
- $(address,1,15)
- If *
- REPLACE SESSIONS with '~~~'
- endif
- Store curline+1 to curline
- If curline > 63
- EJECT
- Store 1 to curline
- endif
- endif
- SKIP
- Store recc+1 to recc
- If recc = 20
- Store 0 to recc
- Store recnumb+20 to recnumb
- Set format to screen
- ? recnumb,' records processed.'
- Set format to print
- endif
- enddo
- EJECT
- Set format to screen
- USE &M1FILE
- ? 'Expansion is complete. Now indexing SESSFILE by Session name.'
- Set talk on
- Index on sessions+last:name+first:name to &M1FILE
- Set talk off
- USE &M1FILE index &M1FILE
- ? 'SESSFILE generation is complete.'
- Release spac,actcount,actlist,reccount,xlast,xfirst,xmemb,xhph,xaddr,xzip
- Release xcityst,xbirth,xsssc,spactiv,xskills,xdates,curline,chr31
- Release M1FILE,LASTREC,RECNUMB,RECC,CURREC,FIELDCNT,BADSPACT,SP:ACTIVTY
- endif
- else
- Store d+':SESSFILE' to M1FILE
- Use &M1FILE index &M1FILE
- endif
- Select secondary
- Store ' ' to ssel
- Do while ssel<>'Q'
- ?
- Accept 'Enter a Session code ' to ssel
- Store F to validd
- Do while .not. validd
- Store T to validd
- If !(ssel)='Q'.or.ssel=' '
- Store 'Q' to ssel
- else
- Store 'SESS='+ssel to sfind
- Select secondary
- Find &sfind
- If #=0
- Accept 'This Session is not found in EDIRFILE. Enter again ' to ssel
- Store F to validd
- endif
- endif
- enddo
- Select primary
- Find &ssel
- If ssel<>'Q'.and. #<>0
- ?
- ? ' ',$(spact,12,44),$(ename,1,20),' ',date()
- SKIP
- Do while sessions=ssel .and. .not. EOF
- Store 0 to I
- Do while I<22 .and. sessions=ssel .and. .not. EOF
- Store I+1 to I
- ? last:name,first:name,home:phone,address
- SKIP
- enddo
- If sessions=ssel
- Accept 'Press <return> to continue ' to xx
- endif
- enddo
- ? ' End-of-Sessions '
- endif
- enddo
- Select primary
- Use &MFILE index &MFILE
- endif
- endif
- RETURN
-
- ons <> ' '
- Set talk off
- USE &M1FILE
- GOTO BOTTOM
- Store #+1 to lastrec
- GOTO top
- Store 1 to reccount
- ? 'Now expanding SESSFILE file for multi-sessions people.'
- Set format to print
- @ 1,20